package com.shuma.shopmanage.shopmodule.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shuma.shopmanage.model.shop.dto.*;
import com.shuma.shopmanage.model.shop.model.Goods;
import com.shuma.shopmanage.model.shop.vo.GoodsVo;
import com.shuma.shopmanage.model.shop.vo.PageVo;
import com.shuma.shopmanage.model.shop.vo.PreviewVo;

import java.util.List;


public interface GoodsService extends IService<Goods> {
    public GoodsVo insertGood(GoodsDto good);


    PageVo queryPageByUid(GoodsPageDto goodsPageDto, Long uid);

    //商品批量下线
    public void goodsBathesOffline(ApproveDto approveDto);

    //商品下线
    public boolean goodsOffline(Long id);

    //商品批量上线
    public void goodsBathesOnline(ApproveDto approveDto);

    //商品上线
    public boolean goodsOnline(Long id);

    //商品详情
    public GoodsVo getGoodsDetailById(Long goodsId,Long userId);

    //商品预览
    public PreviewVo getGoodsPreviewById(Long goodsId,Long userId);

    //商品编辑
    public Goods goodsEditingById(Long goodsId,Long userId);

    //转交管理人
    public void goodsTransferManagement(Long goodsId,String userName);

    //发起审批
    public boolean goodsApprove(ApproveDto approveDto);

    //审批
    public boolean goodsApproveAfter(ApproveDto approveDto);

    PageVo queryPageCondition(QueryDto queryDto, GoodsPageDto goodsPageDto);

    PageVo queryPageConditionByUid(QueryDto queryDto, GoodsPageDto goodsPageDto, Long userId);

    PageVo queryPage(GoodsPageDto goodsPageDto);


    public void autoTakeoff(ApproveDto approveDto);
}
